<?php


namespace App\Controller\App;


use App\Base\BaseController4App;
use App\Entity\GiftLog;
use App\Entity\User;
use App\Repository\BannerRepository;
use App\Repository\GiftLogRepository;
use App\Repository\GiftRepository;
use App\Repository\MoneyRepository;
use App\Repository\PageRepository;
use App\Repository\SalesCutRepository;
use App\Repository\SalesUserJuanRepository;
use App\Repository\SiteOilCategoryRepository;
use App\Repository\SiteRepository;
use App\Repository\UserRepository;
use App\Service\MoneyService;
use Symfony\Component\Routing\Annotation\Route;

/**
 * @Route("/app")
 */
class AppPageController extends BaseController4App
{
    /**
     * @Route("/page", name="AppPageGetByCode")
     */
    public function AppPageGetByCode(
       PageRepository $pageRepository
    )
    {
        $req = $this->getRequestData();
        $code = $req["code"]??1;
        $data = $pageRepository->findOneBy(array("code"=>$code));
        return $this->json_out(1,"OK",$data);
    }

}